/*
This program cleans NIBRS data and merges the data with weather and gun policy data to create the final NIBRS analysis dataset
*/

timer clear
timer on 2

*Set working directory
if c(username)=="" { //insert username
cd "" // insert root path
}

if c(username)=="jmc4qg" { 
cd "/Users/jmc4qg/The Lab Dropbox/Jonathan Colmer/ShotSpotter_env/Journal_submissions/ReStat/Replication Folder" 
}

if c(username)=="jonathancolmer" { 
cd "/Users/jonathancolmer/The Lab Dropbox/Jonathan Colmer/ShotSpotter_env/Journal_submissions/ReStat/Replication Folder"
}

* List necessary programs
loc clean_ORI								= 1 // drop missing ORIs and keep relevant variables
loc clean_cc_policy							= 1 // clean gun control policies
loc build_NIBRS								= 1 // build NIBRS dataset
loc merge_data								= 1 // merge crime data with policy and weather dataset

*Run Programs
foreach file in clean_ORI clean_cc_policy build_NIBRS merge_data {
		if ``file'' {
			do "Data Build Code/2_NIBRS/`file'"
		}
	}
	

timer off 2
timer list 2

disp 2511.04/60 

* 42 minutes
